{
语法百题 解题报告：
 http://git.oschina.net/et0662/sznoi-grammar/ 
}
var
	a:array[0..29] of longint;
	i,n:integer;
begin
	a[0]:=1;
	a[1]:=2;
	readln(n);
	for i:=2 to n-1 do
		a[i]:=a[i-1]+a[i-2];
	writeln(a[n-1]);
end.
